import { BasicColumn, FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '分类ID',
    dataIndex: 'categoryId',
  },
  {
    title: '属性名称',
    dataIndex: 'name',
  },
  {
    title: '类型(1:规格;2:属性;)',
    dataIndex: 'type',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'categoryId',
    label: '分类ID',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'name',
    label: '属性名称',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    field: 'type',
    label: '类型(1:规格;2:属性;)',
    component: 'Input',
    colProps: { span: 6 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: 'ID',
    component: 'Input',
    show: false,
  },
  {
    field: 'categoryId',
    label: '分类ID',
    component: 'Input',
    required: true,
  },
  {
    field: 'name',
    label: '属性名称',
    component: 'Input',
    required: true,
  },
  {
    field: 'type',
    label: '类型(1:规格;2:属性;)',
    component: 'Input',
    required: true,
  },
];
